// 一级路由
import Login from '@/views/login'
import Registered from '@/views/registered'
import Zhuye from '@/views/zhuye'
// 二级路由
import Information from '@/views/information'
import Mymine from '@/views/mymine'
import Shouye from '@/views/shouye'
import Find from '@/views/find'
import Gorent from '@/views/gorent'
import Citylist from '@/views/citylist'
// 我的三极路由
import Collect from '@/views/collect'
import Myrent from '@/views/myrent'
import Looked from '@/views/looked'
// import Houser from '@/views/houser'
import Userinfor from '@/views/userinfor'
// import Contactus from '@/views/contactus'
// 首页三极路由
// import Gorent from '@/views/gorent'

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
  path: '/login',
  component: Login
},
{
  path: '/registered',
  component: Registered
},
{
  path: '/collect',
  component: Collect
},
{
  path: '/myrent',
  component: Myrent
},
{
  path: '/citylist',
  component: Citylist
},
{
  path: '/gorent',
  component: Gorent
},
{
  path: '/',
  component: Zhuye,
  redirect: '/shouye',
  children: [{
    path: '/shouye',
    component: Shouye
  },
  {
    path: '/find',
    component: Find
  },
  {
    path: '/information',
    component: Information
  },
  {
    path: '/mymine',
    component: Mymine,
    children: [
      {
        path: '/looked',
        component: Looked
      },
      {
        path: '/userinfor',
        component: Userinfor
      }
    ]
  }
  ]
}
]

const router = new VueRouter({
  routes
})

export default router
